import Cookies from 'js-cookie'

const TokenKey = 'vue_admin_template_token'
const userIdKey = 'hgc_user_id'
const userDeptKey = 'hgc_user_dept'

export function getToken() {
  return Cookies.get(TokenKey)
}

export function setToken(token) {
  return Cookies.set(TokenKey, token)
}

export function removeToken() {
  return Cookies.remove(TokenKey)
}

export function setUserId(userid) {
  return Cookies.set(userIdKey,userid);
}
export function getUserId() {
  return Cookies.get(userIdKey);
}
export function setUserDept(userid) {
  return Cookies.set(userDeptKey,userid);
}
export function getUserDept() {
  return Cookies.get(userDeptKey);
}
